-- GENERATED SPELL FOR [Wrathtail Sorceress] --


function spell0_3717(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_3717', 8301, 1)
end

function spell1_3717(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20792,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3717', 7000, 1)
end

function spell2_3717(pUnit, Event) --@Quick Frost Ward,n/a--
pUnit:FullCastSpellOnTarget(4980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3717', 11500, 1)
end

function Sorts_3717(pUnit, Event)
local choix_sorts_3717 = math.random(0, 2)
if choix_sorts_3717 == 0 then
pUnit:RegisterEvent('spell0_3717', 1, 1)
end
if choix_sorts_3717 == 1 then
pUnit:RegisterEvent('spell1_3717', 1, 1)
end
if choix_sorts_3717 == 2 then
pUnit:RegisterEvent('spell2_3717', 1, 1)
end
end

function mob3717_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3717', math.random(1500, 3000), 1)
end

function mob3717_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3717_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3717_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3717, 1, 'mob3717_Action')
RegisterUnitEvent(3717, 2, 'mob3717_Leave')
RegisterUnitEvent(3717, 3, 'mob3717_Kill')
RegisterUnitEvent(3717, 4, 'mob3717_Die')
